<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>Library Interface</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="generator" content="Doc-O-Matic" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <link rel="STYLESHEET" href="default.css" type="text/css" />

<script type="text/javascript" src="scripts.js"></script>
</head>
<body class="Element700" onload="onBodyLoadEx('frames.html', 'topic', '00635.html');" onmousedown="onBodyMouseDown();">

<!-- Begin Popups -->

<!-- End Popups -->

<!-- Begin Page Header -->
<div class="Element710" id="areafixed">
<div class="Element94">
<a href="00626.html" target="topic">OSAL Library Help</a> &gt; <a href="00635.html" target="topic">Library Interface</a></div>
<div class="Element92">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td width="25%">
<div class="Element1">
MPLAB Harmony Core Help</div>
</td><td width="25%">
<div class="Element2">
<a href="contents.html" target="tocidx">Contents</a> | <a href="00007.html" target="topic">Home</a></div>
</td><td width="25%">
<div class="Element90">
<a href="00628.html" target="topic">Previous</a> | <a href="00626.html" target="topic">Up</a> | <a href="00664.html" target="topic">Next</a></div>
</td><td width="25%">
<div class="Element96">
<a href="mailto:docerrors@microchip.com&subject=MPLAB Harmony Documentation Feedback (Topic ID: OSAL Library Interface Topic Title: Library Interface)&body=Thank you for your feedback! Please include a description of your feedback, and indicate whether you are reporting an an error in the documentation or an enhancement.">Documentation Feedback</a><br> <a href="http://support.microchip.com" target="_blank">Microchip Support</a></div>
</td></tr></table><div class="Element5">
Library Interface</div>
</div>
</div>

<!-- End Page Header -->

<!-- Begin Client Area -->
<div class="Element720" id="areascroll">
<div class="Element721">

<!-- Begin Page Content -->
<a name="PageContent"></a><div class="Element58">
<a name="4465736372697074696F6E"></a><div class="Element11">
<div class="Element10">
<p class="Element10">
This section describes the APIs of the OSAL Library. Refer to each section for a description.</p></div>
</div>
<a name="61292053656D6170686F72652046756E6374696F6E73"></a><div class="Element14">
a) Semaphore Functions</div>
<div class="Element11">
<div class="Element10">
<div class="Element212">
<div class="TableDiv">
<table cellspacing="0" class="Table0">
<tr>
<td class="Element200" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element201">
 &nbsp;</div></td><td class="Element200" valign="top" width="25%">
<div class="Element201">
Name&nbsp;</div></td><td class="Element204" valign="top" width="65%">
<div class="Element205">
Description&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_method.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00664.html" target="topic">OSAL_SEM_Create</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Creates an OSAL Semaphore.&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_method.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00666.html" target="topic">OSAL_SEM_Delete</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Deletes an OSAL Semaphore.&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_method.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00668.html" target="topic">OSAL_SEM_Pend</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Waits on a semaphore. Returns true if the semaphore was obtained within the time limit.&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_method.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00669.html" target="topic">OSAL_SEM_Post</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Posts a semaphore or increments a counting semaphore.&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_method.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00670.html" target="topic">OSAL_SEM_PostISR</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Posts a semaphore or increments a counting semaphore from within an Interrupt Service Routine (ISR).&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_method.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00667.html" target="topic">OSAL_SEM_GetCount</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Returns the current value of a counting semaphore.&nbsp;</div></td></tr></table></div></div>
</div>
</div>
<a name="6229204D757465782046756E6374696F6E73"></a><div class="Element14">
b) Mutex Functions</div>
<div class="Element11">
<div class="Element10">
<div class="Element212">
<div class="TableDiv">
<table cellspacing="0" class="Table0">
<tr>
<td class="Element200" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element201">
 &nbsp;</div></td><td class="Element200" valign="top" width="25%">
<div class="Element201">
Name&nbsp;</div></td><td class="Element204" valign="top" width="65%">
<div class="Element205">
Description&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_method.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00654.html" target="topic">OSAL_MUTEX_Create</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Creates a mutex.&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_method.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00656.html" target="topic">OSAL_MUTEX_Delete</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Deletes a mutex.&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_method.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00657.html" target="topic">OSAL_MUTEX_Lock</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Locks a mutex.&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_method.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00658.html" target="topic">OSAL_MUTEX_Unlock</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Unlocks a mutex.&nbsp;</div></td></tr></table></div></div>
</div>
</div>
<a name="632920437269746963616C2053656374696F6E2046756E6374696F6E73"></a><div class="Element14">
c) Critical Section Functions</div>
<div class="Element11">
<div class="Element10">
<div class="Element212">
<div class="TableDiv">
<table cellspacing="0" class="Table0">
<tr>
<td class="Element200" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element201">
 &nbsp;</div></td><td class="Element200" valign="top" width="25%">
<div class="Element201">
Name&nbsp;</div></td><td class="Element204" valign="top" width="65%">
<div class="Element205">
Description&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_method.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00646.html" target="topic">OSAL_CRIT_Enter</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Enters a critical section with the specified severity level.&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_method.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00647.html" target="topic">OSAL_CRIT_Leave</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Leaves a critical section with the specified severity level.&nbsp;</div></td></tr></table></div></div>
</div>
</div>
<a name="6429204D656D6F727920416C6C6F636174696F6E2046756E6374696F6E73"></a><div class="Element14">
d) Memory Allocation Functions</div>
<div class="Element11">
<div class="Element10">
<div class="Element212">
<div class="TableDiv">
<table cellspacing="0" class="Table0">
<tr>
<td class="Element200" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element201">
 &nbsp;</div></td><td class="Element200" valign="top" width="25%">
<div class="Element201">
Name&nbsp;</div></td><td class="Element204" valign="top" width="65%">
<div class="Element205">
Description&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_method.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00653.html" target="topic">OSAL_Malloc</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Allocates memory using the OSAL default allocator.&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_method.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00651.html" target="topic">OSAL_Free</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Deallocates a block of memory and return to the default pool.&nbsp;</div></td></tr></table></div></div>
</div>
</div>
<a name="6529204F53414C20436F6E74726F6C2046756E6374696F6E73"></a><div class="Element14">
e) OSAL Control Functions</div>
<div class="Element11">
<div class="Element10">
<div class="Element212">
<div class="TableDiv">
<table cellspacing="0" class="Table0">
<tr>
<td class="Element200" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element201">
 &nbsp;</div></td><td class="Element200" valign="top" width="25%">
<div class="Element201">
Name&nbsp;</div></td><td class="Element204" valign="top" width="65%">
<div class="Element205">
Description&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_method.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00652.html" target="topic">OSAL_Initialize</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Performs OSAL initialization.&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_method.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00659.html" target="topic">OSAL_Name</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Obtains the name of the underlying RTOS.&nbsp;</div></td></tr></table></div></div>
</div>
</div>
<a name="6629204461746120547970657320616E6420436F6E7374616E7473"></a><div class="Element14">
f) Data Types and Constants</div>
<div class="Element11">
<div class="Element10">
<div class="Element212">
<div class="TableDiv">
<table cellspacing="0" class="Table0">
<tr>
<td class="Element200" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element201">
 &nbsp;</div></td><td class="Element200" valign="top" width="25%">
<div class="Element201">
Name&nbsp;</div></td><td class="Element204" valign="top" width="65%">
<div class="Element205">
Description&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_enum.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00648.html" target="topic">OSAL_CRIT_TYPE</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Enumerated type representing the possible types of critical section.&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_enum.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00660.html" target="topic">OSAL_RESULT</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Enumerated type representing the general return value from OSAL functions.&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_enum.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00671.html" target="topic">OSAL_SEM_TYPE</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Enumerated type representing the possible types of semaphore.&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_interface.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00665.html" target="topic">OSAL_SEM_DECLARE</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Declares an OSAL semaphore.&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_interface.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00655.html" target="topic">OSAL_MUTEX_DECLARE</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Declares an OSAL mutex.&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="10%" style="white-space: nowrap;">
<div class="Element203">
<img src="indicator_interface.gif" border="0" alt="" title="">&nbsp;</div></td><td class="Element202" valign="top" width="25%">
<div class="Element203">
<a href="00000.html" target="topic">_OSAL_H</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
This is macro _OSAL_H.&nbsp;</div></td></tr></table></div></div>
</div>
</div>
</div>
<!-- End Page Content -->

<!-- Begin Page Footer -->
<div class="Element95">
<a href="00626.html" target="topic">OSAL Library Help</a> &gt; <a href="00635.html" target="topic">Library Interface</a></div>
<div class="Element93">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td width="25%">
<div class="Element3">
MPLAB Harmony Core Help</div>
</td><td width="25%">
<div class="Element4">
<a href="contents.html" target="tocidx">Contents</a> | <a href="00007.html" target="topic">Home</a></div>
</td><td width="25%">
<div class="Element91">
<a href="00628.html" target="topic">Previous</a> | <a href="00626.html" target="topic">Up</a> | <a href="00664.html" target="topic">Next</a></div>
</td><td width="25%">
<div class="Element97">
<a href="mailto:docerrors@microchip.com&subject=MPLAB Harmony Documentation Feedback (Topic ID: OSAL Library Interface Topic Title: Library Interface)&body=Thank you for your feedback! Please include a description of your feedback, and indicate whether you are reporting an an error in the documentation or an enhancement.">Documentation Feedback</a><br> <a href="http://support.microchip.com" target="_blank">Microchip Support</a></div>
</td></tr></table></div>

<!-- End Page Footer -->
</div>
</div>

<!-- End Client Area -->
</body></html>